function Tab(el,options = {}){
this.el=document.querySelector(el)//this是Tab1.box或者Tab2.box或者Tab3.box
this.init()//调用下面的函数
}
Tab.prototype.init =function(){
    this.titleOver()//调用下面的函数
   
}
Tab.prototype.titleOver =function(){
    let liObjs=this.el.querySelectorAll("ul li")//this是Tab1.box或者Tab2.box或者Tab3.box
    liObjs.forEach((item,i)=>{
    item.onmouseover=()=>{//用箭头函数是为了改变this指向，是父function
    this.el.querySelector("ul li.active").className=""//this是Tab1.box或者Tab2.box或者Tab3.box
    item.className="active"
    this.changeContent(i)//this是Tab1，Tab2，Tab3
    }   
    })
}
Tab.prototype.changeContent =function(i){
    this.el.querySelector("ol li.active").className=""//this是Tab1.box或者Tab2.box或者Tab3.box
    this.el.querySelector(`ol li:nth-of-type(${i+1})`).className="active"//this是Tab1.box或者Tab2.box或者Tab3.box
}
// export default Tab;